<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="email=no"/>
    <title>意见反馈</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/vant.css">
    <link rel="stylesheet" href="../../css/main.css">
</head>

<body>
<div class="app send-moment" v-cloak>
    <header>
        <div class="flex-x-sb send-moment-header">
            <span class="iconfont goback" @click="back">&#xe66f;</span>
            <div class="title">{{title}}</div>
            <div class="release-btn" @click="submit">提交</div>
        </div>
    </header>
    <div class="pt bgFQ">
        <div class="release-textarea">
            <van-field v-model="message" rows="5" autosize type="textarea" placeholder="请输入意见或建议……"></van-field>
        </div>
    </div>
</div>
<script src="../../script/api.js"></script>
<script src="../../script/flexible.js"></script>
<script src="../../script/fastclick.js"></script>
<script src="../../script/vue.min.js"></script>
<script src="../../script/iconfont.js"></script>
<script src="../../script/vant.min.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/restful.js"></script>
<script src="../../script/businessCommon.js"></script>
<script>
    apiready = function () {
        vm = new Vue({
            el: '.app',
            data: {
                message: '',
                title: '意见反馈'
            },
            mounted: function () {
                this.title = api.pageParam.title
            },
            methods: {

                back: function () {
                    api.closeWin();
                },

                submit: function () {
                    const vm = this;
                    if (!vm.message) {
                        toastMiddle("您还没有填写反馈内容哟！")
                        return false
                    }
                    mime("addFeedback")(vm.message, () => {
                        api.alert({msg: '提交成功'}, (ret) => {
                            api.closeWin()
                        });
                    })
                },
            },
        })
    }
</script>
</body>

</html>
